package com.minimalist.common.entity.lindi.vo.index;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */

@Schema(name = "林地指标交易平台_新闻查询实体")
public class LindiIndexQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "镇街名称不能为空", groups = {Add.class, Update.class})
    @Schema(name = "locationName", description = "镇街名称", type = "string")
    private String locationName;

    public LindiIndexQueryVO(){
    }

    public String getLocationName(){
        return locationName;
    }

    public void setLocationName(String locationName){
        this.locationName = locationName;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiIndexQueryVO that = (LindiIndexQueryVO) o;
        return Objects.equals(locationName, that.locationName);
    }

    @Override
    public int hashCode(){
        return Objects.hash(super.hashCode(), locationName);
    }
}
